import java.util.Scanner;

public class Test {

    public static void main(String[] args) { new Test().run(); }

    void run() {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        long t = in.nextLong();
        StringBuilder ans = new StringBuilder();
        char[] str = in.next().toCharArray();
        for (int i = 0; i < n; i++) {
            boolean isEven = str[i] == '0';
            for (int j = 1; i - j >= 0 && j <= t; j++)
                if ((t & j) == j && str[i - j] == '1') isEven = !isEven;
            ans.append(isEven ? 0 : 1);
        }
        System.out.println(ans);
    }
}
